# -*- encoding=utf-8 -*-


from constants import CalcType


class BaseModule:
    """抽象模块
    """

    def __init__(self):
        pass

    def process(self, task):
        raise NotImplementedError

    def process_single_thread(self, tasks):
        raise NotImplementedError

    def process_multi_thread(self, tasks):
        raise NotImplementedError

    def process_multi_process(self, tasks):
        raise NotImplementedError

    def process_coroutine(self, tasks):
        raise NotImplementedError

    # def start(self, task_list):
    #     if self.calc_type == CalcType.SingleThread:
    #         return self.process_single_thread(task_list)
    #     elif self.calc_type == CalcType.MultiThread:
    #         return self.process_multi_thread(task_list)
    #     elif self.calc_type == CalcType.MultiProcess:
    #         return self.process_multi_process(task_list)
    #     elif self.calc_type == CalcType.PyCoroutine:
    #         return self.process_coroutine(task_list)
